<title>设置我的资料</title>

<div class="layui-card layadmin-header">
    <div class="layui-breadcrumb" lay-filter="breadcrumb">
        <a lay-href="">主页</a>
        <a><cite>用户</cite></a>
        <a><cite>我的资料</cite></a>
    </div>
</div>

<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <div class="layui-card-header">设置我的资料</div>
                <div class="layui-card-body" pad15>
                    <div class="layui-form" lay-filter="">
                        <script type="text/html" template lay-url="/user/getInfo" lay-done="">
                            <div class="layui-form-item">
                                <label class="layui-form-label">我的角色</label>
                                <div class="layui-input-inline">
                                    <select name="role" lay-verify=>
                                        <option value="1" {{ d.data.role === '1' ? 'selected' : 'disabled' }}>超级管理员</option>
                                        <option value="2" {{ d.data.role === '2' ? 'selected' : 'disabled' }}>数据管理员</option>
                                        <option value="3" {{ d.data.role === '3' ? 'selected' : 'disabled' }}>操作员</option>
                                    </select>
                                </div>
                                <div class="layui-form-mid layui-word-aux">当前角色不可更改为其它角色</div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">用户名</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="username" value="{{ d.data.username }}" readonly class="layui-input">
                                </div>
                                <div class="layui-form-mid layui-word-aux">不可修改。一般用于后台登入名</div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">昵称</label>
                                <div class="layui-input-inline">
                                    <input href="javascript:;" type="text" name="nickname" value="{{ d.data.nickname }}" lay-verify="nickname" autocomplete="off" placeholder="请输入昵称" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">性别</label>
                                <div class="layui-input-block">
                                    <input type="radio" name="sex" value=1 title="男" {{ d.data.sex==='1' ? 'checked' : '' }}>
                                    <input type="radio" name="sex" value=2 title="女" {{ d.data.sex==='2' ? 'checked' : '' }}>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">邮箱</label>
                                <div class="layui-input-inline">
                                    <input type="text" name="email" value="{{ d.data.email || '' }}" lay-verify="email" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label">备注</label>
                                <div class="layui-input-block">
                                    <textarea name="remarks" placeholder="请输入内容" class="layui-textarea">{{ d.data.remarks }}</textarea>
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <div class="layui-input-block">
                                    <button class="layui-btn" lay-submit lay-filter="setmyinfo">确认修改</button>
                                    <button type="reset" class="layui-btn layui-btn-primary">重新填写</button>
                                </div>
                            </div>
                        </script>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    layui.use('set', layui.factory('set'));
</script>